package uoa.assignment.character;

import java.util.Random;

public class Player extends GameCharacter{

	public Player(String name) {
		super(name);
	}

	
	public
	void hurtCharacter(GameCharacter character) {
		if(!character.successfulDefense())
		{
			character.setHealth(character.getHealth()-50);
		}
	}

	
	public
	boolean successfulDefense() {
		Random random= new Random();
		int chance=random.nextInt(100);
		return chance >= 70;
	}

}
